package com.yuan.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 消息的消费者
 * @Author yuan
 * @Date 2021/8/25 10:46
*/
//@Component
@RabbitListener(queues = RabbitConfig.QUEUE_B)
@Slf4j
public class MsgReceiverB {
    @RabbitHandler
    public void process(String content) {
        log.info("接收处理队列B当中的消息： " + content);
    }
    @RabbitHandler
    public void process(Map<String,Object> map) {
        log.info("接收处理队列B当中的消息： " + map.toString());
    }
}
